The invention is based on a sensor DE 44 10 217 A1 has already disclosed a sensor with a number of housing parts. In this sensor, a fastening device is glued to a window. Two sliders, which are guided in an outer housing part and function as a fastening means, allow the outer housing part to engage with the fastening device. The sensor elements are affixed to an inner housing part, which is pressed against the window by means of a spring force acting on the outer housing part. This type of fastening, however, is complex, expensive, malfunction-prone, and therefore connected with high costs.